Dynamic stream processing within an operator graph

ABSTRACT

A method and system for processing a stream of tuples in a stream-based application is disclosed. The method may include a first stream operator determining whether a requirement to modify processing of a first tuple at a second stream operator exists. The method may provide for associating an indication to modify processing of the first tuple at the second stream operator if the requirement exists.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of co-pending U.S. patent applicationSer. No. 13/627,608, filed Sep. 26, 2012. The aforementioned relatedpatent application is herein incorporated by reference in its entirety.

FIELD

This disclosure generally relates to stream computing, and inparticular, to computing applications that receive streaming data andprocess the data as it is received.

BACKGROUND

Database systems are typically configured to separate the process ofstoring data from accessing, manipulating, or using data stored in adatabase. More specifically, database systems use a model in which datais first stored and indexed in a memory before subsequent querying andanalysis. In general, database systems may not be well suited forperforming real-time processing and analyzing streaming data. Inparticular, database systems may be unable to store, index, and analyzelarge amounts of streaming data efficiently or in real time.

SUMMARY

Embodiments of the disclosure provide a method, system, and computerprogram product for processing data. The method, system, and computerprogram receive streaming data to be processed by a plurality ofprocessing elements comprising one or more stream operators.

One embodiment is directed to a method for processing a stream of tuplesin a stream-based application. The first stream operator may determinewhether a requirement to modify processing of a first tuple at a secondstream operator exists. The method may provide for associating anindication to modify processing of the first tuple at the second streamoperator if the requirement exists.

Another embodiment is directed to a system for processing a stream oftuples in a stream-based application. The system may include a pluralityof stream operators. The system may include a first stream operator thatmay determine whether a requirement to modify processing of a firsttuple at a second stream operator exists. In addition, the first streamoperator may associate an indication to modify processing of the firsttuple at the second stream operator if the requirement exists.

Yet another embodiment is directed to a computer program product.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a computing infrastructure configured to execute astream computing application according to various embodiments.

FIG. 2 illustrates a more detailed view of a compute node of FIG. 1according to various embodiments.

FIG. 3 illustrates a more detailed view of the management system of FIG.1 according to various embodiments.

FIG. 4 illustrates a more detailed view of the compiler system of FIG. 1according to various embodiments.

FIG. 5 illustrates a more detailed view of an operator graph in astream-based application according to various embodiments.

FIG. 6 illustrates a more detailed view of dynamic processing of a datastream according to various embodiments.

FIG. 7 illustrates a method for dynamically modifying the processing oftuples in a streaming application according to various embodiments.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

Stream-based computing and stream-based database computing are emergingas a developing technology for database systems. Products are availablewhich allow users to create applications that process and querystreaming data before it reaches a database file. With this emergingtechnology, users can specify processing logic to apply to inbound datarecords while they are “in flight,” with the results available in a veryshort amount of time, often in fractions of a second. Constructing anapplication using this type of processing has opened up a newprogramming paradigm that will allow for development of a broad varietyof innovative applications, systems, and processes, as well as presentnew challenges for application programmers and database developers.

In a stream-based computing application, stream operators are connectedto one another such that data flows from one stream operator to the next(e.g., over a TCP/IP socket). Scalability is achieved by distributing anapplication across nodes by creating executables (i.e., processingelements), as well as replicating processing elements on multiple nodesand load balancing among them. Stream operators in a stream computingapplication can be fused together to form a processing element that isexecutable. Doing so allows processing elements to share a commonprocess space, resulting in much faster communication between streamoperators than is available using inter-process communication techniques(e.g., using a TCP/IP socket). Further, processing elements can beinserted or removed dynamically from an operator graph representing theflow of data through the stream computing application.

A “tuple” is data. More specifically, a tuple is a sequence of one ormore attributes associated with a thing. Examples of attributes may beany of a variety of different types, e.g., integer, float, Boolean,string, etc. The attributes may be ordered. A tuple may be extended byadding one or more additional attributes to it. In addition toattributes associated with a thing, a tuple may include metadata, i.e.,data about the tuple. As used herein, “stream” or “data stream” refersto a sequence of tuples. Generally, a stream may be considered apseudo-infinite sequence of tuples.

Stream computing applications handle massive volumes of data that needto be processed efficiently and in real time. For example, a streamcomputing application may continuously ingest and analyze hundreds ofthousands of messages per second and up to petabytes of data per day.Accordingly, each stream operator in a stream computing application maybe required to process a received tuple within fractions of a second.

Embodiments disclosed herein are directed to methods and apparatusesthat enhance the ability of a stream operator to efficiently and rapidlyprocess a received data stream. In one embodiment, it may be determinedthat a particular stream operator or a particular group of streamoperators modify processing of tuples if a particular requirementexists. An indication may be associated with these tuples. Theindication instructs the particular stream operators that the tuplesmeeting this requirement are to remain in the data stream, but theprocessing is to be modified. Modification of processing may, forexample, include skipping processing of the tuple in some embodiments.The stream operator may rapidly examine a received tuple to determine ifthe indicator is associated with the tuple, and if it is associated, theoperator may forward the tuple to a next stream operator without havingto take the time to process the tuple.

FIG. 1 illustrates one exemplary computing infrastructure 100 that maybe configured to execute a stream-based computing application, accordingto some embodiments. The computing infrastructure 100 includes amanagement system 105 and two or more compute nodes 110A-110D—i.e.,hosts—which are communicatively coupled to each other using one or morecommunications networks 120. The communications network 120 may includeone or more servers, networks, or databases, and may use a particularcommunication protocol to transfer data between the compute nodes110A-110D. A compiler system 102 may be communicatively coupled with themanagement system 105 and the compute nodes 110 either directly or viathe communications network 120.

FIG. 2 is a more detailed view of a compute node 110, which may be thesame as one of the compute nodes 110A-110D of FIG. 1, according tovarious embodiments. The compute node 110 may include, withoutlimitation, one or more processors (CPUs) 205, a network interface 215,an interconnect 220, a memory 225, and a storage 230. The compute node110 may also include an I/O device interface 210 used to connect I/Odevices 212, e.g., keyboard, display, and mouse devices, to the computenode 110.

Each CPU 205 retrieves and executes programming instructions stored inthe memory 225 or storage 230. Similarly, the CPU 205 stores andretrieves application data residing in the memory 225. The interconnect220 is used to transmit programming instructions and application databetween each CPU 205, I/O device interface 210, storage 230, networkinterface 215, and memory 225. The interconnect 220 may be one or morebusses. The CPUs 205 may be a single CPU, multiple CPUs, or a single CPUhaving multiple processing cores in various embodiments. In oneembodiment, a processor 205 may be a digital signal processor (DSP). Oneor more processing elements 235 (described below) may be stored in thememory 225. A processing element 235 may include one or more streamoperators 240 (described below). In one embodiment, a processing element235 is assigned to be executed by only one CPU 205, although in otherembodiments the stream operators 240 of a processing element 235 mayinclude one or more threads that are executed on two or more CPUs 205.The memory 225 is generally included to be representative of a randomaccess memory, e.g., Static Random Access Memory (SRAM), Dynamic RandomAccess Memory (DRAM), or Flash. The storage 230 is generally included tobe representative of a non-volatile memory, such as a hard disk drive,solid state device (SSD), or removable memory cards, optical storage,flash memory devices, network attached storage (NAS), or connections tostorage area network (SAN) devices, or other devices that may storenon-volatile data. The network interface 215 is configured to transmitdata via the communications network 120.

A streams application may include one or more stream operators 240 thatmay be compiled into a “processing element” container 235. The memory225 may include two or more processing elements 235, each processingelement having one or more stream operators 240. Each stream operator240 may include a portion of code that processes tuples flowing into aprocessing element and outputs tuples to other stream operators 240 inthe same processing element, in other processing elements, or in boththe same and other processing elements in a stream computingapplication. Processing elements 235 may pass tuples to other processingelements that are on the same compute node 110 or on other compute nodesthat are accessible via communications network 120. For example, aprocessing element 235 on compute node 110A may output tuples to aprocessing element 235 on compute node 110B.

The storage 230 may include a buffer 260. Although shown as being instorage, the buffer 260 may be located in the memory 225 of the computenode 110 or in a combination of both memories. Moreover, storage 230 mayinclude storage space that is external to the compute node 110, such asin a cloud.

FIG. 3 is a more detailed view of the management system 105 of FIG. 1according to some embodiments. The management system 105 may include,without limitation, one or more processors (CPUs) 305, a networkinterface 315, an interconnect 320, a memory 325, and a storage 330. Themanagement system 105 may also include an I/O device interface 310connecting I/O devices 312, e.g., keyboard, display, and mouse devices,to the management system 105.

Each CPU 305 retrieves and executes programming instructions stored inthe memory 325 or storage 330. Similarly, each CPU 305 stores andretrieves application data residing in the memory 325 or storage 330.The interconnect 320 is used to move data, such as programminginstructions and application data, between the CPU 305, I/O deviceinterface 310, storage unit 330, network interface 305, and memory 325.The interconnect 320 may be one or more busses. The CPUs 305 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 305 may bea DSP. Memory 325 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 330 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or the cloud. Thenetwork interface 315 is configured to transmit data via thecommunications network 120.

The memory 325 may store a stream manager 134. Additionally, the storage330 may store an operator graph 335. The operator graph 335 may definehow tuples are routed to processing elements 235 (FIG. 2) forprocessing.

FIG. 4 is a more detailed view of the compiler system 102 of FIG. 1according to some embodiments. The compiler system 102 may include,without limitation, one or more processors (CPUs) 405, a networkinterface 415, an interconnect 420, a memory 425, and storage 430. Thecompiler system 102 may also include an I/O device interface 410connecting I/O devices 412, e.g., keyboard, display, and mouse devices,to the compiler system 102.

Each CPU 405 retrieves and executes programming instructions stored inthe memory 425 or storage 430. Similarly, each CPU 405 stores andretrieves application data residing in the memory 425 or storage 430.The interconnect 420 is used to move data, such as programminginstructions and application data, between the CPU 405, I/O deviceinterface 410, storage unit 430, network interface 415, and memory 425.The interconnect 420 may be one or more busses. The CPUs 405 may be asingle CPU, multiple CPUs, or a single CPU having multiple processingcores in various embodiments. In one embodiment, a processor 405 may bea DSP. Memory 425 is generally included to be representative of a randomaccess memory, e.g., SRAM, DRAM, or Flash. The storage 430 is generallyincluded to be representative of a non-volatile memory, such as a harddisk drive, solid state device (SSD), removable memory cards, opticalstorage, flash memory devices, network attached storage (NAS),connections to storage area-network (SAN) devices, or to the cloud. Thenetwork interface 415 is configured to transmit data via thecommunications network 120.

The memory 425 may store a compiler 136. The compiler 136 compilesmodules, which include source code or statements, into the object code,which includes machine instructions that execute on a processor. In oneembodiment, the compiler 136 may translate the modules into anintermediate form before translating the intermediate form into objectcode. The compiler 136 may output a set of deployable artifacts that mayinclude a set of processing elements and an application descriptionlanguage file (ADL file), which is a configuration file that describesthe streaming application. In some embodiments, the compiler 136 may bea just-in-time compiler that executes as part of an interpreter. Inother embodiments, the compiler 136 may be an optimizing compiler. Invarious embodiments, the compiler 136 may perform peepholeoptimizations, local optimizations, loop optimizations, inter-proceduralor whole-program optimizations, machine code optimizations, or any otheroptimizations that reduce the amount of time required to execute theobject code, to reduce the amount of memory required to execute theobject code, or both.

The compiler 136 may also provide the application administrator with theability to optimize performance through profile-driven fusionoptimization. Fusing operators may improve performance by reducing thenumber of calls to a transport. While fusing stream operators mayprovide faster communication between operators than is available usinginter-process communication techniques, any decision to fuse operatorsrequires balancing the benefits of distributing processing acrossmultiple compute nodes with the benefit of faster inter-operatorcommunications. The compiler 136 may automate the fusion process todetermine how to best fuse the operators to be hosted by one or moreprocessing elements, while respecting user-specified constraints. Thismay be a two-step process, including compiling the application in aprofiling mode and running the application, then re-compiling and usingthe optimizer during this subsequent compilation. The end result may,however, be a compiler-supplied deployable application with an optimizedapplication configuration.

FIG. 5 illustrates an exemplary operator graph 500 for a streamcomputing application beginning from one or more sources 135 through toone or more sinks 504, 506, according to some embodiments. This flowfrom source to sink may also be generally referred to herein as anexecution path. Although FIG. 5 is abstracted to show connectedprocessing elements PE1-PE10, the operator graph 500 may include dataflows between stream operators 240 (FIG. 2) within the same or differentprocessing elements. Typically, processing elements, such as processingelement 235 (FIG. 2), receive tuples from the stream as well as outputtuples into the stream (except for a sink—where the stream terminates,or a source—where the stream begins).

The example operator graph shown in FIG. 5 includes ten processingelements (labeled as PE1-PE10) running on the compute nodes 110A-110D. Aprocessing element may include one or more stream operators fusedtogether to form an independently running process with its own processID (PID) and memory space. In cases where two (or more) processingelements are running independently, inter-process communication mayoccur using a “transport,” e.g., a network socket, a TCP/IP socket, orshared memory. However, when stream operators are fused together, thefused stream operators can use more rapid communication techniques forpassing tuples among stream operators in each processing element.

The operator graph 500 begins at a source 135 and ends at a sink 504,506. Compute node 110A includes the processing elements PE1, PE2, andPE3. Source 135 flows into the processing element PE1, which in turnoutputs tuples that are received by PE2 and PE3. For example, PE1 maysplit data attributes received in a tuple and pass some data attributesin a new tuple to PE2, while passing other data attributes in anothernew tuple to PE3. As a second example, PE1 may pass some received tuplesto PE2 while passing other tuples to PE3. Data that flows to PE2 isprocessed by the stream operators contained in PE2, and the resultingtuples are then output to PE4 on compute node 110B. Likewise, the tuplesoutput by PE4 flow to operator sink PE6 504. Similarly, tuples flowingfrom PE3 to PE5 also reach the operators in sink PE6 504. Thus, inaddition to being a sink for this example operator graph, PE6 could beconfigured to perform a join operation, combining tuples received fromPE4 and PE5. This example operator graph also shows tuples flowing fromPE3 to PE7 on compute node 110C, which itself shows tuples flowing toPE8 and looping back to PE7. Tuples output from PE8 flow to PE9 oncompute node 110D, which in turn outputs tuples to be processed byoperators in a sink processing element, for example PE10 506.

The tuple received by a particular processing element 235 (FIG. 2) isgenerally not considered to be the same tuple that is output downstream.Typically, the output tuple is changed in some way. An attribute ormetadata may be added, deleted, or changed. However, it is not requiredthat the output tuple be changed in some way. Generally, a particulartuple output by a processing element may not be considered to be thesame tuple as a corresponding input tuple even if the input tuple is notchanged by the processing element. However, to simplify the presentdescription and the claims, an output tuple that has the same dataattributes as a corresponding input tuple may be referred to herein asthe same tuple.

Processing elements 235 (FIG. 2) may be configured to receive or outputtuples in various formats, e.g., the processing elements or streamoperators could exchange data marked up as XML documents. Furthermore,each stream operator 240 within a processing element 235 may beconfigured to carry out any form of data processing functions onreceived tuples, including, for example, writing to database tables orperforming other database operations such as data joins, splits, reads,etc., as well as performing other data analytic functions or operations.

The stream manager 134 of FIG. 1 may be configured to monitor a streamcomputing application running on compute nodes, e.g., compute nodes110A-110D, as well as to change the deployment of an operator graph,e.g., operator graph 132. The stream manager 134 may move processingelements from one compute node 110 to another, for example, to managethe processing loads of the compute nodes 110A-110D in the computinginfrastructure 100. Further, stream manager 134 may control the streamcomputing application by inserting, removing, fusing, un-fusing, orotherwise modifying the processing elements and stream operators (orwhat tuples flow to the processing elements) running on the computenodes 110A-110D. One example of a stream computing application is IBM®'sInfoSphere® Streams (note that InfoSphere® is a trademark ofInternational Business Machines Corporation, registered in manyjurisdictions worldwide).

Because a processing element may be a collection of fused streamoperators, it is equally correct to describe the operator graph as oneor more execution paths between specific stream operators, which mayinclude execution paths to different stream operators within the sameprocessing element. FIG. 5 illustrates execution paths betweenprocessing elements for the sake of clarity.

FIG. 6 shows a more detailed view of an operator graph 600 of astreaming application in which processing of incoming tuples may bedynamically modified, according to some embodiments. Operator graph 600shows two different execution paths: execution path 660 and executionpath 665. Execution path 660 contains stream operators 605, 610, and615; execution path 665 contains stream operators 620, 627, 629, and630. Each of the execution paths may contain its own stream operators insome embodiments and may share stream operators with other executionpaths in other embodiments. Execution paths may, for example, completedifferent types of processing on a given tuple, or they may processdifferent aspects of an incoming tuple. In some embodiments, executionpath 660 may be the only execution path, but in others execution path665 may be the only execution path. As shown in FIG. 6, source 135 maytransmit a stream of tuples along execution path 660 and execution path665. In some embodiments, the operator graph may have more executionpaths. In other embodiments, the operator graph may have fewer executionpaths.

FIG. 6 illustrates various embodiments in which processing at a streamoperator, group of stream operators, or level of stream operators may bedynamically modified. The various embodiments are depicted in oneoperator graph, although in some embodiments, some or all of thesemethods may be used. In some embodiments, dynamic modification ofprocessing may include outputting a tuple without any processing. Inother embodiments, dynamic modification of processing may includeoutputting a tuple and skipping a portion of the processing operationsat one or more stream operators. The embodiments described herein mayallow for processing to be modified at either a stream operator, groupof stream operators, or level of stream operators. In FIG. 6, streamoperator group 625 may represent a group of stream operators accordingto some embodiments. Levels A-D 640, 645, 650, and 655 may representlevels of stream operators in some embodiments. Operator group 625 andlevels A-D 640, 645, 650, and 655 are used herein as examples ofgrouping stream operators that may occur when dynamically modifyingprocessing within an operator graph.

Execution paths 660 and 665 may run independently of each other, buttheir respective operators may still be hosted on the same computerhardware that supports the stream computing application. For example,stream operator 605 and stream operator 610 may execute on the samecompute node as stream operator 620. That is, stream operators fromdifferent execution paths may share the same network interface 215,memory 225, or CPU 205, of the compute node 110 as shown in FIG. 2.

According to some embodiments, execution path 660 may transmit an inputdata stream from source 135 to stream operator 605. Stream operator 605may process the tuples from the input data stream and may generate anoutput data stream. The output data stream generated by stream operator605 may become the input data stream for stream operator 610. Streamoperator 605 may determine that a requirement exists for one or moreparticular stream operators to output the particular tuple withoutprocessing it.

Stream operator 605 may check for various types of requirements. Forexample, in some embodiments, the requirement may be to check whether aparticular attribute value is present in the tuple. In otherembodiments, the stream operator 605 may check whether a particularattribute value is missing from the tuple. In yet other embodiments, therequirement may be checking a time-based criterion, such as, forexample, whether a tuple has been in the operator graph longer than aspecified amount of time or exceeds a threshold period of time.

When stream operator 605 determines that a requirement exists for atuple, the stream operator 605 may associate an indication with thetuple that one or more particular stream operators, e.g., operator 610,should not process this particular incoming tuple. In some embodiments,the indication may instruct particular stream operators that the tuplesare to remain in the data stream without being processed. In otherembodiments, the indication may instruct particular stream operatorsthat the tuples are to remain in the data stream with limitedprocessing. An example of limited processing is a situation in which astream operator is configured with a plurality of processing operations,and less than all of this plurality of operations is to be skipped. Theindication may be associated with a tuple by adding or modifying headeror trailer information for the tuple, such as, for example, metadata forthe tuple. The indication may be a tuple that is output to thedownstream stream operator indicating that the next tuple, next group oftuples, next tuples within a period of time, or combinations thereof,received should not be processed, according to some embodiments.

Stream operator 610 may receive the input and read the indication thatit should not process the particular tuple generated by stream operator605. A receiving stream operator, such as stream operator 610, may becapable of independently determining that it should not process theparticular tuple by evaluating one or more attributes of the tuple,however, reading the indication may result in faster processing thanevaluating by the stream operator. The operator graph may, in someembodiments, include a processing precedence order. This may, forexample, provide that the sending stream operator's (stream operator605, for example) processing requirement may supersede the receivingstream operator's (stream operator 610, for example) own logic, despitethe receiving stream operator being configured with its own processingrequirements. As one example, stream operator 610 may be configured todiscard a tuple having a particular attribute or attribute value, butsending stream operator 605 may have a requirement that these tuples notbe discarded. In this example, the requirement of sending streamoperator 605 may supersede the requirement of receiving stream operator610. Alternatively, the requirement of receiving stream operator 610 maysupersede the requirement of sending stream operator 605. In someembodiments, stream operator 610 may then output a corresponding tupleto stream operator 615 for additional processing. The correspondingtuples generated by stream operator 610 may have the same attributevalues as the input tuples it received. Stream operator 615 may processthe incoming tuple in some embodiments, and may generate an output datastream that it transmits to sink 635.

In another embodiment, the stream operator 605 may associate anindication with the tuple modifying processing of the tuple at one ormore particular stream operators, e.g., operator 610, when therequirement is a performance requirement or condition. A performancerequirement or condition may be, for example, a maximum duration of timewithin which a stream operator, e.g., stream operator 610, may berequired to complete its processing. In other embodiments, a performancerequirement or condition may be a maximum number of exceptions that canoccur, a maximum number of iterations a process may run, or othersimilar performance-based criteria. The indication may modify processingat stream operator 610 such that processing may be attempted at streamoperator 610 until the performance requirement or condition is violated,at which point stream operator 610 may output a tuple matching the inputtuple it received from stream operator 605.

According to some embodiments, execution path 665 may includetransmitting an input data stream from source 135 to stream operator620. Stream operator 620 may process the input tuples from the inputdata stream and output tuples. The output tuples of stream operator 620may become input tuples for stream operator 627. Stream operator 620 maydetermine that a group of stream operators, e.g., group 625, shouldmodify processing on tuples where a particular requirement exists.Stream operator group 625 may include stream operators 627 and 629. Anindication may be associated with a tuple output by stream operator 620that corresponds with a tuple received by operator 620 for which theparticular requirement exists that indicates that operators in thestream operator group 625 should not process the tuple. Stream operator627 may receive the particular tuple (with the associated indication)output by operator 620 and output a corresponding tuple to streamoperator 629 without processing the tuple. This tuple output by streamoperator 627 to stream operator 629 may include the associatedindication. Upon receipt of a tuple having an associated indication thatthe particular requirement exists, stream operator 629, like streamoperator 627, may output a corresponding tuple without processing thetuple. Stream operator 629 may receive the tuple from stream operator627, inspect it for the associated indication, and output acorresponding tuple that may, in some embodiments, become an input tuplefor stream operator 630. Unlike the stream operators in stream operatorgroup 625, stream operator 630 may not receive any indication that thetuple should not be processed further. Alternatively, stream operator630 may inspect an associated indication that the tuple should not beprocessed further, but ignore the indication upon determining that theindication is only applicable to a stream operator group that does notinclude stream operator 630. Stream operator 630 may process the inputtuple and output a tuple. The output tuple of stream operator 630 may betransmitted to sink 635 in some embodiments.

According to some embodiments, operator graph 600 may be divided intomultiple processing levels. Each level may contain some amount ofprocessing. A level may be defined as a number of subsequent operatorsfrom a particular operator. For example in FIG. 6, stream operator 615may be considered to be two levels from stream operator 605. A level maycorrespond to a single or more than one stream operator in an executionpath. Levels may be either on the same compute node or on differentcompute nodes. In another embodiment, a level may correspond tohardware. That is, a level may represent a specified piece of hardware.A specified piece of hardware may include, for example, one or morephysical machines, one or more physical racks of machines, or one ormore cores of a processor. In other embodiments, a level may evenrepresent a physical location of hardware. For example, hardware may bedistributed across different locations and a level may represent one ormore physical locations.

In the example of FIG. 6, source 135 generates an input data stream thatis transmitted to both stream operator 605 and stream operator 620. Bothstream operator 605 and stream operator 620 are part of Level A 640. Insome embodiments, a stream operator in Level A 640 may process theincoming tuple from source 135, determine that one or more downstreamlevels of stream operators should not process the tuple, and associatean indication with the tuple that the tuple should remain in the datastream without being processed. In other words, an indication with atuple to modify processing may specify a number of operators subsequentto a particular stream operator, i.e., one or more levels. For example,stream operator 605 may associate an indication that two levels ofprocessing should be modified, which in turn may cause stream operators610 and 615 to output the particular tuple without processing it.

In some embodiments, this may mean that stream operators in Level B 645may receive an input tuple that carries an indication that Level B 645should not process the incoming tuple, but that tuple should remain inthe data stream. A stream operator in Level B 645 may then output atuple that is the same as the input tuple and transmit that output tupleto the next level in the operator graph, i.e., either Level C 650 orLevel D 655.

FIG. 7 illustrates a method 700 for dynamically modifying processing oftuples in a streaming application, according to some embodiments. Asshown, the method 700 begins at operation 705, when a stream operatorreceives an input tuple. At operation 710, a stream operator maydetermine whether a requirement to modify processing of a particulartuple by a second stream operator exists.

In some embodiments, the decision to not process a tuple at a downstreamstream operator, group of stream operators, or level of stream operatorsmay be, for example, because of unusable data. For example, anapplication may receive a data stream from a tollbooth monitoringsystem. Each tuple in the stream may contain an attribute that is animage of the entire vehicle, an attribute that is an image of thepassenger compartment, and an attribute that is an image of the licenseplate. The operator graph may include three stream operators, one todetermine the type of the vehicle (either passenger or commercial), oneto determine how many passengers are in the car, and one to determine orread the license plate number. It may be possible to determine in afirst stream operator, e.g., the operator that determines vehicle type,that the image of the passenger compartment is not likely to yield apassenger count prior to the tuple reaching the stream operator at whichthe passenger count is determined (for example, if there was a glare orsome other reason the image was corrupted). Because the second attributemay be unusable, the first stream operator may associate an indicationwith the tuple instructing the second stream operator to modify itsprocessing and output a corresponding tuple. In that case, it may bepossible to modify the processing so that a second stream operatordetermining the passenger count outputs a corresponding tuple withoutprocessing it, and the tuple is retained in the application.Alternatively, the second stream operator may begin processing but abortits processing if a passenger count determination is not made within aspecified time or a specified number of iterations of an imageprocessing method. The application may continue processing with thestream operator that is determining the license plate number. This is anexample embodiment and is not intended to limit the scope of thisdisclosure.

Based on the determination in operation 710, the stream operator mayperform an operation 715 associating an indication to modify processingthe particular tuple at another stream operator. The indication mayinstruct particular stream operators that the tuple is to remain in thedata stream without being processed. The indication may be limited tosome of the processing operations within a specific stream operator. Insome embodiments, the indication may be limited to a specific streamoperator. In other embodiments, the indication may include a group ofstream operators. In other embodiments, the indication may apply to oneor more levels of stream operators. Additionally, at operation 720, thestream operator may determine whether an indication to modify processingof a particular tuple exists. At operation 725, a stream operator mayprocess and then transmit the tuple according to the operator graph ifno indication exists. If an indication does exist, at operation 730 astream operator may transmit a corresponding tuple according to theoperator graph without processing or with modified processing.

In the foregoing, reference is made to various embodiments. It should beunderstood, however, that this disclosure is not limited to thespecifically described embodiments. Instead, any combination of thedescribed features and elements, whether related to differentembodiments or not, is contemplated to implement and practice thisdisclosure. Furthermore, although embodiments of this disclosure mayachieve advantages over other possible solutions or over the prior art,whether or not a particular advantage is achieved by a given embodimentis not limiting of this disclosure. Thus, the described aspects,features, embodiments, and advantages are merely illustrative and arenot considered elements or limitations of the appended claims exceptwhere explicitly recited in a claim(s).

As will be appreciated by one skilled in the art, aspects of the presentdisclosure may be embodied as a system, method, or computer programproduct. Accordingly, aspects of the present disclosure may take theform of an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.), or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module,” or “system.”Furthermore, aspects of the present disclosure may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination thereof. More specificexamples (a non-exhaustive list) of the computer readable storage mediumwould include the following: an electrical connection having one or morewires, a portable computer diskette, a hard disk, a random access memory(RAM), a read-only memory (ROM), an erasable programmable read-onlymemory (EPROM or Flash memory), an optical fiber, a portable compactdisc read-only memory (CD-ROM), an optical storage device, a magneticstorage device, or any suitable combination thereof. In the context ofthis disclosure, a computer readable storage medium may be any tangiblemedium that can contain, or store, a program for use by or in connectionwith an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wire line, optical fiber cable, RF, etc., or any suitable combinationthereof.

Computer program code for carrying out operations for aspects of thepresent disclosure may be written in any combination of one or moreprogramming languages, including: (a) an object oriented programminglanguage such as Java, Smalltalk, C++, or the like; (b) conventionalprocedural programming languages, such as the “C” programming languageor similar programming languages; and (c) a streams programminglanguage, such as IBM Streams Processing Language (SPL). The programcode may execute as specifically described herein. In addition, theprogram code may execute entirely on the user's computer, partly on theuser's computer, as a stand-alone software package, partly on the user'scomputer and partly on a remote computer, or entirely on the remotecomputer or server. In the latter scenario, the remote computer may beconnected to the user's computer through any type of network, includinga local area network (LAN) or a wide area network (WAN), or theconnection may be made to an external computer (for example, through theInternet using an Internet Service Provider).

Aspects of the present disclosure have been described with reference toflowchart illustrations, block diagrams, or both, of methods,apparatuses (systems), and computer program products according toembodiments of this disclosure. It will be understood that each block ofthe flowchart illustrations or block diagrams, and combinations ofblocks in the flowchart illustrations or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing the functionsor acts specified in the flowchart or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function or act specified in the flowchart or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus, or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions or acts specified in the flowchart or blockdiagram block or blocks.

Embodiments according to this disclosure may be provided to end-usersthrough a cloud-computing infrastructure. Cloud computing generallyrefers to the provision of scalable computing resources as a serviceover a network. More formally, cloud computing may be defined as acomputing capability that provides an abstraction between the computingresource and its underlying technical architecture (e.g., servers,storage, networks), enabling convenient, on-demand network access to ashared pool of configurable computing resources that can be rapidlyprovisioned and released with minimal management effort or serviceprovider interaction. Thus, cloud computing allows a user to accessvirtual computing resources (e.g., storage, data, applications, and evencomplete virtualized computing systems) in “the cloud,” without regardfor the underlying physical systems (or locations of those systems) usedto provide the computing resources.

Typically, cloud-computing resources are provided to a user on apay-per-use basis, where users are charged only for the computingresources actually used (e.g., an amount of storage space used by a useror a number of virtualized systems instantiated by the user). A user canaccess any of the resources that reside in the cloud at any time, andfrom anywhere across the Internet. In context of the present disclosure,a user may access applications or related data available in the cloud.For example, the nodes used to create a stream computing application maybe virtual machines hosted by a cloud service provider. Doing so allowsa user to access this information from any computing system attached toa network connected to the cloud (e.g., the Internet).

The flowchart and block diagrams in the figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present disclosure. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams or flowchart illustration, andcombinations of blocks in the block diagrams or flowchart illustration,can be implemented by special purpose hardware-based systems thatperform the specified functions or acts, or combinations of specialpurpose hardware and computer instructions.

Although embodiments are described within the context of a streamcomputing application, this is not the only context relevant to thepresent disclosure. Instead, such a description is without limitationand is for illustrative purposes only. Of course, one of ordinary skillin the art will recognize that embodiments of the present invention maybe configured to operate with any computer system or application capableof performing the functions described herein. For example, embodimentsof the invention may be configured to operate in a clustered environmentwith a standard database processing application.

While the foregoing is directed to exemplary embodiments, other andfurther embodiments of the invention may be devised without departingfrom the basic scope thereof, and the scope thereof is determined by theclaims that follow.

What is claimed is:
 1. A computer program product for processing astream of tuples, the computer program product comprising anon-transitory computer readable storage medium readable by a processingcircuit and storing instructions for execution by the processing circuitfor performing a method, the method comprising: receiving a stream oftuples to be processed by a plurality of processing elements operatingon one or more computer processors, each processing element having oneor more stream operators, a first stream operator configured toassociate an indication to tuples that require modified processing and asecond stream operator configured to perform a data processingoperation; receiving a first tuple at the second stream operator; firstexamining, by the second stream operator, the first tuple for theindication; performing, by the second stream operator, the dataprocessing operation on first data in response to the receiving thefirst tuple, the performing the data processing operation based on notdetecting the indication during the first examining, the data processingoperation modifying the first data in a first manner; receiving a secondtuple at the second stream operator; second examining, by the secondstream operator, the second tuple for the indication; and performing, bythe second stream operator, a modified data processing operation onsecond data in response to the receiving the second tuple, theperforming the modified data processing operation based on detecting theindication during the second examining, the indication having beenassociated with the second tuple by the first stream operator, themodified data processing operation modifying the second data in a secondmanner different from the first manner, the second tuple remaining inthe stream of tuples after the performing the modified data processingoperation.
 2. The computer program product of claim 1, wherein theperforming the data processing operation comprises skipping the dataprocessing operation, the method further comprising transmitting thesecond tuple from the first stream operator to the second streamoperator, and transmitting the second tuple from the second streamoperator to a third stream operator.
 3. The computer program product ofclaim 2, the method further comprising receiving the second tuple at thethird stream operator and processing of the second tuple by the thirdstream operator.
 4. The computer program product of claim 1, wherein thesecond stream operator is a particular group of two or more streamoperators.
 5. The computer program product of claim 1, the methodfurther comprising dividing stream operators into levels, wherein thesecond stream operator includes all stream operators at a particularlevel.
 6. The computer program product of claim 1, the method furthercomprising: receiving the second tuple at the first stream operator;determining, by the first stream operator, that a requirement to modifyprocessing of the second tuple by a second stream operator exists,wherein the requirement to modify processing of the second tupleincludes a performance condition; and associating, by the first streamoperator, the indication with the second tuple.
 7. The computer programproduct of claim 1, wherein the first stream operator is configured toperform a first process on a received tuple, the second stream operatoris configured to perform a second process on a received tuple, and athird stream operator is configured to perform a third process on areceived tuple.
 8. A system for processing a stream of tuples,comprising: a memory; and a processor circuit in communication with thememory, wherein the system is configured to perform a method, the methodcomprising: receiving a stream of tuples to be processed by a pluralityof processing elements operating on one or more computer processors,each processing element having one or more stream operators, a firststream operator configured to associate an indication to tuples thatrequire modified processing and a second stream operator configured toperform a data processing operation; receiving a first tuple at thesecond stream operator; first examining, by the second stream operator,the first tuple for the indication; performing, by the second streamoperator, the data processing operation on first data in response to thereceiving the first tuple, the performing the data processing operationbased on not detecting the indication during the first examining, thedata processing operation modifying the first data in a first manner;receiving a second tuple at the second stream operator; secondexamining, by the second stream operator, the second tuple for theindication; and performing, by the second stream operator, a modifieddata processing operation on second data in response to the receivingthe second tuple, the performing the modified data processing operationbased on detecting the indication during the second examining, theindication having been associated with the second tuple by the firststream operator, the modified data processing operation modifying thesecond data in a second manner different from the first manner, thesecond tuple remaining in the stream of tuples after the performing themodified data processing operation.
 9. The system of claim 8, whereinthe performing the data processing operation comprises skipping the dataprocessing operation, the method further comprising transmitting thesecond tuple from the first stream operator to the second streamoperator, and transmitting the second tuple from the second streamoperator to a third stream operator.
 10. The system of claim 9, themethod further comprising receiving the second tuple at the third streamoperator and processing of the second tuple by the third streamoperator.
 11. The system of claim 8, wherein the first stream operatoris configured to perform a first process on a received tuple, the secondstream operator is configured to perform a second process on a receivedtuple, and a third stream operator is configured to perform a thirdprocess on a received tuple.
 12. The system of claim 8, the methodfurther comprising establishing an operator graph of the one or morestream operators, the operator graph defining one or more executionpaths in which the first stream operator is configured to receive tuplesfrom one or more upstream stream operators and transmit the tuples toone or more downstream stream operators.
 13. The system of claim 8, themethod further comprising dividing stream operators into levels, whereinthe second stream operator includes all stream operators at a particularlevel.
 14. The system of claim 8, the method further comprising:receiving the second tuple at the first stream operator; determining bythe first stream operator that a particular attribute value is presentin the second tuple; and associating, by the first stream operator, theindication with the second tuple, the associating the indication withthe second tuple based on the determining that the particular attributevalue is present.
 15. The system of claim 8, the method furthercomprising: receiving the second tuple at the first stream operator;determining by the first stream operator that a particular attributevalue is missing from the second tuple; and associating, by the firststream operator, the indication with the second tuple, the associatingthe indication with the second tuple based on the determining that theparticular attribute value is missing.
 16. The system of claim 8, themethod further comprising: receiving the second tuple at the firststream operator; determining by the first stream operator that thesecond tuple has been in an operator graph for a time period thatexceeds a threshold time period; and associating, by the first streamoperator, the indication with the second tuple, the associating theindication with the second tuple based on the determining that the timeperiod exceeds the threshold.
 17. The system of claim 8, the methodfurther comprising: receiving the second tuple at the first streamoperator; and associating, by the first stream operator, the indicationwith the second tuple, wherein the associating the indication with thesecond tuple includes outputting by the first stream operator a thirdtuple to the second stream operator.
 18. The system of claim 8, whereinthe data processing operation comprises two or more processingoperations and wherein the modified data processing operation comprisesless than all of the two or more processing operations.
 19. The systemof claim 8, the method further comprising: receiving the second tuple atthe first stream operator; determining, by the first stream operator,that a requirement to modify processing of the second tuple by a secondstream operator exists, wherein the requirement to modify processing ofthe second tuple includes a performance condition; and associating, bythe first stream operator, the indication with the second tuple.
 20. Thesystem of claim 8, wherein the detecting the indication for a tuple isselected from the group consisting of: identifying a qualifying headerassociated with the tuple; identifying a qualifying trailer associatedwith the tuple; identifying qualifying metadata associated with thetuple; and determining that the tuple satisfies qualifying criteria, thequalifying criteria established by a previously received tuple.